<!-- // Child.vue 接收 -->
<template>
  <div>
    <p>子组件  接收1{{ msg1 }}</p>
    <button @click="huaqian">花钱</button>
  </div> 

</template>
<script>
export default {
  name:'ChildComponent',
  props: ["msg1", "msg2","money"],// 如果这行不写，下面就接收不到
  setup(props,context) {
    console.log(props) // { msg1:"这是传给子组件的信息1", msg2:"这是传给子组件的信息2" }

    const huaqian = () => {
      debugger
      context.emit('handleChild')
    }

    return {
      huaqian
    }
  },
}
</script>